<?

require_once ("application.list.inc");

global $_GLOBAL_DBH;
global $_OBJECT_IFACE_PANEL;

$lc_inv_ctl_categories = array (
	name=>array (label=>"Name",order=>"DEFAULT",wrapper=>"vmc_icon_category"),
	description=>array (label=>"Description",order=>"DEFAULT",
			callback=>"_template_list_substring",length=>16),
	cdate=>array (label=>"Create Date",order=>"DEFAULT",wrapper=>"vmc_icon_date"),
);

$link_options_path = array (
	array (
		fs_tab=>"inv_ctl_categories",
		fs_tab_option=>"lc_inv_ctl_categories"
	)
);

$link_options = _app_create_tabbing (null, $link_options_path);

$object_ctl_path = array (
	array (
		fs_action=>"view",
		fs_tab=>"inv_ctl_categories",
		fs_tab_option=>"fs_inv_ctl_categories",
	)
);

$object_ctl .= _app_create_tabbing ( "/inventory_control/fs_inv_ctl.php?",
		$object_ctl_path) . "&";

$list_options_path = array (
	array (
		fs_action=>"addnew",
		fs_tab=>"inv_ctl_categories",
		fs_tab_option=>"fs_inv_ctl_categories",
	)
);

$list_options = array (
	array (
		label=>"Add A Category",
		link=>_app_create_tabbing ("fs_inv_ctl.php?", $list_options_path)
	),
);

$_OBJECT_IFACE_LIST = _app_create_list_object (array (
		db_conn=>$_GLOBAL_DBH,
		indexes=>$lc_inv_ctl_categories,
		list_count=>"SELECT COUNT(*) FROM inv_ctl_categories",
		list_select=>"SELECT * FROM inv_ctl_categories",
		list_id=>"lc_inv_ctl_categories",
		list_options=>$list_options,
		primary_key=>"id",
		primary_relation=>"category_id",
		link_options=>$link_options,
		object_ctl=>$object_ctl
));

$_OBJECT_IFACE_TABBING_PANEL->insert_container ($_OBJECT_IFACE_LIST);

?>
